/**
 * 
 */
package connection;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;



/**
 * @author argeu
 *
 */
public class ConnectionFactory {
	private static Connection connection = null;
	
	public static Connection getConnection() throws SQLException{
		if(connection == null || (connection != null && connection.isClosed()) ){
			connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/postgres","postgres","postgres");
		}
		return connection;
		
	}
}
